Conventionally, a microcomputer uses a program that uses a technique to measure a process time of a specific process in the program. Such a technique is described in Japanese Patent Laid-Open No. H3-118644 (JP '644), where the process is configured to set a start address for starting process time measurement and an end address for ending process time measurement, in order to calculate the process time as a time measurement between those two addresses. However, the microcomputer may execute subroutines such as a mathematical function and various interrupt programs during the execution of a main routine, and the subroutines may further be interrupted by interruptions. Therefore, in order to measure a process time of each of those interruptions, registers to hold a measurement start address and a measurement end address for each of the various processes and interruptions and/or registers to record measurement results need to be provided, as disclosed in Japanese Patent No. 2,595,718 (JP '718).
When an emulator of the microcomputer is provided for debugging of a program, restrictions on a circuit scale is comparatively light. However, in recent years, the microcomputer has a built-in debug function for debugging a program, a so-called on-chip debug function. In such a case, the restrictions on the circuit scale are comparatively heavy, thereby making it preferable to minimize redundant circuit configuration.